﻿using System.Threading;
using Catel.Articles.Base.Data.Attributes;

namespace Catel.Articles._02___WPF_controls.Examples.PleaseWaitWindow
{
    [Example("PleaseWaitWindow", "Example of the PleaseWaitWindow",
        LongDescription = @"The PleaseWaitWindow is a great window to show during long operations. There is also a PleaseWaitHelper " + 
                           "class to make it even easier to use the PleaseWaitWindow.",
        SourceFileName = "/Examples/PleaseWaitWindow/Code.txt",
        ImageUri = "/Examples/PleaseWaitWindow/Screenshot.png",
        ClickHandlerName = "ShowExample")]
    public class Example
    {
        /// <summary>
        /// Shows the example.
        /// </summary>
        private static void ShowExample()
        {
            // Show window
            Windows.PleaseWaitHelper.Show(() => Thread.Sleep(2000));
        }
    }
}
